ReceiveHeadersCallback

public interface ReceiveHeadersCallback implements NetworkSyncCallback<P, R>

The callback is invoked when the response headers have been received for a URL request.

The callback can be used to add, modify, or remove the HTTP headers received over the network.

Use the override method to override the response headers.

Use the proceed method if you do not need to modify the headers.

If the callback throws an exception, the proceed method will be invoked.

Types

Link copied to clipboard
public interface Params
The parameters of the ReceiveHeadersCallback.
Link copied to clipboard
public interface Response
A response for ReceiveHeadersCallback.

Functions

Link copied to clipboard
@CheckForNull()
public abstract R on(P params)
Invoked when the callback needs a response of type R that may be determined based on the provided callback parameters.